<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring" %>  

<script type="text/javascript">
    $(document).ready(function(){
        $("#btnAnnuler").click(function(){
            location='etablissements';
        });
    });
</script>

<form:form name="frmBase" action="etablissement.save" method="post" modelAttribute="etablissement">
    <form:hidden path="id" />
    
    <table>
        <tr>
            <th>N°UAI:</th>
            <td>
                <form:input path="uai" />
            </td>
        </tr>
        <tr>
            <th>Nom:</th>
            <td>
                <form:input path="nom" />
            </td>
        </tr>
        <tr>
            <th>Adresse:</th>
            <td>
                <form:input path="adresse.adresse1" /><br/>
                <form:input path="adresse.adresse2" /><br/>
                <form:input path="adresse.adresse3" />
            </td>
        </tr>
        <tr>
            <th>Téléphone:</th>
            <td>
                <form:input path="telephone" /><br/>
            </td>
        </tr>
        <tr>
            <th>Email:</th>
            <td>
                <form:input path="email" /><br/>
            </td>
        </tr>
    </table>
    
    <form:button type="button" class="btn btn-default btn-md" id="btnAnnuler">Annuler</form:button>
    <form:button type="submit" class="btn btn-primary btn-md">Enregistrer</form:button>
        
</form:form>